package caip2024p.rcv4;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        // 输入字符串
        String s = scanner.next();

        // 反转字符串
        s = new StringBuilder(s).reverse().toString();

        // 根据字符串长度的奇偶性处理
        if (s.length() % 2 != 0) {
            s = s.substring(0, s.length() / 2) + s.substring(s.length() / 2 + 1);
        } else {
            s = s.substring(1, s.length() - 1);
        }

        // 交换相邻字符
        char[] charArray = s.toCharArray();
        for (int i = 0; i < charArray.length - 1; i += 2) {
            char temp = charArray[i];
            charArray[i] = charArray[i + 1];
            charArray[i + 1] = temp;
        }
        s = new String(charArray);

        // 输出结果
        System.out.println(s);

        // 关闭 Scanner
        scanner.close();
    }
}